package alertmanager
Import Path
github.com/K-Phoen/grabana/alertmanager (on go.dev)
Dependency Relation
imports 2 packages, and imported by one package
Package-Level Type Names (total 6)
Contact describes a contact point.
Builder *sdk.ContactPoint
func ContactPoint(name string, opts ...ContactPointOption) Contact
func ContactPoints(contactPoints ...Contact) Option
ContactPointOption represents an option that can be used to configure a
contact point.
func ContactPoint(name string, opts ...ContactPointOption) Contact
Manager represents an alert manager.
MarshalIndentJSON renders the manager as indented JSON.
MarshalJSON implements the encoding/json.Marshaler interface.
*Manager : github.com/goccy/go-json.Marshaler
*Manager : encoding/json.Marshaler
func New(opts ...Option) *Manager
func github.com/K-Phoen/grabana.(*Client).ConfigureAlertManager(ctx context.Context, manager *Manager) error
Option represents an option that can be used to configure an
alert manager.
func ContactPoints(contactPoints ...Contact) Option
func DefaultContactPoint(contactPoint string) Option
func DefaultGroupBys(labels ...string) Option
func Routing(policies ...RoutingPolicy) Option
func Templates(templates map[string]string) Option
func New(opts ...Option) *Manager
RoutingPolicy represents a routing policy.
func Policy(contactPoint string, opts ...RoutingPolicyOption) RoutingPolicy
func Routing(policies ...RoutingPolicy) Option
RoutingPolicyOption represents an option that can be used to configure a
routing policy.
func TagEq(tag string, value string) RoutingPolicyOption
func TagMatches(tag string, regex string) RoutingPolicyOption
func TagNeq(tag string, value string) RoutingPolicyOption
func TagNotMatches(tag string, regex string) RoutingPolicyOption
func Policy(contactPoint string, opts ...RoutingPolicyOption) RoutingPolicy
Package-Level Functions (total 12)
ContactPoint defines a new contact point.
ContactPoints defines the contact points that can receive alerts.
DefaultContactPoint sets the default contact point to be used when no
specific routing policy applies.
DefaultGroupBys sets the default labels that alerts should be grouped by.
New creates a new alert manager.
Policy defines a routing policy that applies to the given contact point.
All the options given on this policy will be combined using a logical "AND".
Routing configures the routing policies to apply on alerts.
TagEq defines an equality ("=") constraint between the given tag and value.
TagMatches defines a similarity ("=~") constraint between the given tag and regex.
TagNeq defines a non-equality ("!=") constraint between the given tag and value.
TagNotMatches defines a non-similarity ("!~") constraint between the given tag and regex.
Templates defines templates that can be used when sending messages to
contact points.
See https://prometheus.io/blog/2016/03/03/custom-alertmanager-templates/
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |